import $http from './index'

// 登录请求
interface LofinFormInt {
    username: string,
    password: string
}
export const login = (data: LofinFormInt) => $http({ url: "/admin/login", method: "post", data })

//获取用户反馈工单列表
export const feedbackList = (data: any) => $http({ url: "/userFeedback/list", method: "post", data })

// 用户反馈工单条件查询
interface searchForm {
    userName: string,
    userPhone: string,
    feedbackStatus: string,
}
interface searchUserForm {
    userName: string,
    phone: string,
}
//用户搜索条件查询
export const queryList = (data: searchForm) => $http({ url: "/userFeedback/queryList", method: "post", data })
export const userQueryList=(data: searchUserForm) => $http({ url: "/user/findUserOrderBy", method: "post", data })

//上传反馈内容
export const upload = (data: any) => $http({ url: "/userFeedback/upload", method: "post", data })
// 反馈详情
interface details {
    id: Number
}
export const detailsList = (data: details) => $http({ url: "/userFeedback/detailsListById", method: "post", data })
//获取用户信息
export const userList = (data: {}) => $http({ url: "/user/userOrder", method: "post", data })

//获取用户数量/订单数量/营收额
export const countAll = () => $http({ url: "/user/userCountAll", method: "post" })
export const orderCount = () => $http({ url: "/order/findorderCount", method: "post" })
export const revenueAmount = () => $http({ url: "/order/findOrderMoney", method: "post" })
export const findRefundOrder = () => $http({ url: "/order/findRefundOrder", method: "post" })

//营销数据
export const dayOrderCount = () => $http({ url: "/user/dayOrderCount", method: "post" })

//路段简报
export const findAllInformation = () =>$http({url:"/Road/findAllInformation",method:"post"})
// 角色管理
interface list {
    limit: number,
    page: number,
    // startIndex: 0,
  };
export const roleMember = (data:list) =>$http({url:"/role/find",method:"post",data})
